﻿<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

    <!-- *MUST BE FIRST* - Import standard DocBook FO style-sheet  -->
    <!-- <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.71.1/fo/docbook.xsl"/> -->
    <xsl:import href="../../xhtml/docbook.xsl"/>

    <!-- == parameters inclusions == -->

    <xsl:include href="param.xsl"/>


    <!-- == custom templates inclusions == -->

    <xsl:include href="chunk-common.xsl"/>
    <xsl:include href="titlepage.templates.xsl"/>
    <xsl:include href="block.xsl"/>
    <xsl:include href="lists.xsl"/>
    <xsl:include href="admon.xsl"/>
    <xsl:include href="inline.xsl"/>
    <xsl:include href="formal.xsl"/>
    <xsl:include href="../../common/mercury/param.xsl"/>
    <xsl:include href="../../common/mercury/gentext.xsl"/>

    <xsl:template name="user.head.content">
        <!--FBA: outputting default CSS stylesheet for final compiler to find it-->
        <xsl:if test="current()[(parent::book or parent::article) and position() = 1]">
            <!-- FBA: only once per document should be enough -->
            <xsl:call-template name="write.text.chunk">
                <xsl:with-param name="filename" select="$html.stylesheet"/>
                <xsl:with-param name="content" select="normalize-space($html.stylesheet.content)">
                    <!-- normalize-space() will somewhat cripple/compress the CSS
                    to prevent its redistribution and make it smaller. -->
                </xsl:with-param>
            </xsl:call-template>
        </xsl:if>
    </xsl:template>

</xsl:stylesheet>
